import React, { Component } from 'react';
var ReactDOM = require('react-dom');
require('./components/Comment.css');

import CommentApp from './components/CommentApp.js';
//import PercentageApp from './components/Calc/PercentageApp.js';
import Clock from './components/Clock/Clock';

export default class App extends Component {

  constructor() {
    super()
    this.state = {
      isClock: true
    }
  }
  handleShowOrHide() {
    this.setState({
      isClock: !this.state.isClock
    })
  }
  render() {
    return (
      <div className="wrapper">
        <CommentApp></CommentApp>
        {/* <PercentageApp />
        {this.state.isClock && <Clock>
          <h2>React.js 小书</h2>
          <div>开源、免费、专业、简单</div>
          订阅：<input />
        </Clock>}
        <br></br>
        <button onClick={this.handleShowOrHide.bind(this)}>
          显示或隐藏时钟
        </button>*/}
      </div> 
    );
  }
}

ReactDOM.render(<App />, document.getElementById('app'));
//setInterval(tick,1000);
